<html xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui" >

    <ui:composition template="layout.xhtml">
        <ui:define name="corpo">
            <h:form id="login_form" acceptcharset="utf-8"> 
                <div id="breadcrumb">
                    <p:commandLink  actionListener="#{managerIndex.redirect('index.xhtml')}" value="Inicio" update="@form" immediate="true"/> >
                    <p:commandLink  actionListener="#{managerIndex.redirect('config.xhtml')}" value="Configurações" update="@form" immediate="true"/> >
                    <p:commandLink  actionListener="#{managerIndex.redirect('criarAcesso.xhtml')}" value="Usuário" update="@form" immediate="true"/> >
                    <p:commandLink  value="Editar Usuário" update="@form" immediate="true"/>    
                </div>
                <p:panel header="Alterar Senha">
                    <p:messages id="msg"/>
                    <fieldset>
                        <legend>Editar Login</legend>
                        <h:panelGrid id="grid" columns="2" border="0" styleClass="textAlignRight" columnClasses="textAlignRight" >

                            <h:outputLabel value="Nome: "  />
                            <h:outputText value="#{managerEditarUsuario.userLogin.nome}"/>
                            <h:outputLabel value="Login: "  />
                            <h:outputText value="#{managerEditarUsuario.userLogin.login}" />
                            <h:outputLabel value="Senha Antiga: "  />
                            <p:password  id="logverifica" value="#{managerEditarUsuario.login.verificaSenha}"
                                         feedback="true" required="true" requiredMessage="o campo senha atual deve ser preenchido"/>  

                            <h:outputLabel value="Nova Senha: "  />
                            <p:password  value="#{managerEditarUsuario.login.senha}"
                                         feedback="true" required="true" requiredMessage="o campo nova senha deve ser preenchido"/> 
                            <h:outputLabel value="Confirmar Senha: "  />
                            <p:password  value="#{managerEditarUsuario.login.confirmaSenha}"
                                         feedback="true" required="true" requiredMessage="o campo confirma senha deve ser preenchido"/> 

                        </h:panelGrid> 
                        <div class="buttonAction">
                            <p:commandButton  id="id_submit" value="Confirmar" 
                                              actionListener="#{managerEditarUsuario.editarNovaSenha()}" 
                                              update="msg" icon="ui-icon-disk"/> 
                            <p:commandButton icon="ui-icon-arrowreturnthick-1-w" value="Voltar"
                                             actionListener="#{managerVisualizarUsuario.redirect('criarAcesso.xhtml') }" 
                                             immediate="true" />

                        </div>

                    </fieldset>

                </p:panel>   
                <p:blockUI block="id_submit" trigger="id_submit">  
                    CARREGANDO...<br />  
                    <p:graphicImage value="/media/img/ajax-loader.gif"/>  
                </p:blockUI>


            </h:form>  
        </ui:define>
    </ui:composition> 
</html>

